<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@include file="../../../inc/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>URL</title>
		<jsp:include page="../../../inc/js.jsp"></jsp:include>
		<jsp:include page="../../../inc/css.jsp"></jsp:include>
		<script type="text/javascript">
$(function() {
	$("#search")
			.button()
			.click(
					function() {
						window.location = '?function_code=${param.function_code}&url=' + $(
								"#url").val();
						return false;
					});
	$("#update").button().click(function() {
		$("#f").ajaxSubmit(function(data){
					var o = jQuery.parseJSON(data);
					if(o.success){
						clearApplication();
						alert('操作成功！');
					}
					else
						alert('操作失败！'+o.err);
			});
		return false;
	});
});
</script>
	</head>
	<body>
		
		
			<table class="list" cellpadding="0" cellspacing="1">
				<thead>
					<tr>
						<td class="search" colspan="3">
							名称：
							<input type="text" name="url" id="url" value="${param.url}" />
							<button id="search">
								查询
							</button>
							<button id="update">
								保存
							</button>
						</td>
					</tr>
					<tr>
						<td>
							序号
						</td>
						<td>
							URL
						</td>
						<td>
							备注
						</td>
					</tr>
				</thead>
				
				<tbody>
					<form id="f" action="updateFunctionURL.do">
					<input type="hidden" id="function_code" name="function_code" value="${param.function_code}">
					<c:forEach var="e" items="${o}" varStatus="s">
						<tr>
							<td align="center">
								${s.index+1}
								<input type="checkbox" value="${e.url}" name="url" ${e.checked}/>
							</td>
							<td>
								${e.url}
							</td>
							<td>
								${e.remark}
							</td>
						</tr>
					</c:forEach>
					</form>
				</tbody>
				
			</table>
		
	</body>
</html>